<?php
final class XmlController  extends ABController{
	function index(){
		
	}
	
	function rss(){
		$o_db  = new dbARecord($this->o_db);
		$o_db->cols('title','content', 'UNIX_TIMESTAMP(modified) as unixt')
		->tables('post')->limit(10)->order('unixt DESC');
		$this->posts=$o_db->select();
		$this->setResponse('text/xml');
		$this->render(true);
	}

	function sitemap(){
		$o_dbpost = new  dbARecord($this->o_db);
		$o_dbpost->tables('post')->cols('title', 'UNIX_TIMESTAMP(modified) as unixt');
		$this->urls = $o_dbpost->select();
		$this->setResponse('text/xml');
		$this->render(true);
	}

	protected function finalize(){
		ABApi::setCommon($this->o_tpl, $this->o_db);
	}
}
